<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<%@ include file="/user/common.jsp"%>
<%@ page import="com.bci.pwtz.common.util.SpringUtil" %>
<%@ page import="com.bci.pwtz.mysql.model.Pdbyq" %>
<%@ page import="com.bci.pwtz.service.PdbyqService" %>
<%@ page import="com.bci.pwtz.mysql.model.Zsbyq" %>
<%@ page import="com.bci.pwtz.service.ZsbyqService" %>
<%@ page import="com.bci.pwtz.mysql.model.Dyxl" %>
<%@ page import="com.bci.pwtz.service.DyxlService" %>
<%
Long companyId=null;
if(user!=null){
    companyId=user.getLastCompanyId();
}
String deviceid=request.getParameter("deviceid");
//deviceid="3498a3b2-e703-410c-aa87-20389f0872e3";
DyxlService dService=(DyxlService)SpringUtil.getBean("dyxlService");
Dyxl device=dService.load(deviceid);
int devicetype=device.getDevicetype();
String transformercode=device.getTransformercode();
String predevicename="";
String byqname="";
String dbyqtype="";
if(devicetype==1){
    PdbyqService service=(PdbyqService)SpringUtil.getBean("pdbyqService");
    Pdbyq obj=service.load(deviceid);
    predevicename=device.getDevicename();
    byqname="配电变压器";
    dbyqtype="pdbyq";
}else{
    ZsbyqService service=(ZsbyqService)SpringUtil.getBean("zsbyqService");
    Zsbyq obj=service.load(deviceid);
    predevicename=device.getDevicename();
    byqname="柱上变压器";
    dbyqtype="zsbyq";
}
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>配网数据-低压线路</title>
<link href="<%=basePath %>user/css/style.css" rel="stylesheet" type="text/css" />
<link href="<%=basePath %>user/css/llcss.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="<%=basePath %>js/jquery/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=basePath %>js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%=basePath %>user/js/hd_ll.js"></script>
<script type="text/javascript" src="<%=basePath %>js/toolutils.js"></script>
<script type="text/javascript" src="<%=basePath %>user/js/common.js"></script>
<script type="text/javascript" src="<%=basePath %>js/ajaxfileupload.js"></script>
<script type="text/javascript">
var companyId=<%=companyId%>;
var devicetype='<%=devicetype%>';
var transformercode='<%=transformercode%>';
</script>
<script type="text/javascript" src="<%=basePath %>user/d/js/dyxladd.js"></script>
<script type="text/javascript">
function selectLoad(){
	//setDefault('devicetype','<%=devicetype%>');
	//transStart();
	setDefault('voltagelevel','<%=device.getVoltagelevel()%>');
	setDefault('linetype','<%=device.getLinetype()%>');
	setDefault('operationstate','<%=device.getOperationstate()%>');
	setDefault('equipmentstate','<%=device.getEquipmentstate()%>');
	setDefault('assetsnature','<%=device.getAssetsnature()%>');
	setDefault('transformercode','<%=device.getTransformercode()%>');
}
</script>
</head>
<body bgcolor="white" onload="selectLoad()">
	<%@ include file="/user/head.jsp"%>
	<!-- main_begin -->
	<div class="pwsj_cont_box">
	<%@ include file="/user/left.jsp"%>
	<!-- 右侧内容_begin -->
	<%if(device!=null) {%>
	<form id="form">
		<div class="pwsj_cont_right_box" scroll="no">
		<!-- 柱上变压器_begin -->
		<div class="pwsj_right_byq" scroll="no">
			<div class="pwsj_right_byq_position" style="margin-bottom:3px;">
				<a href="<%=basePath %>user/m/index.jsp" class="position">配网数据</a>&gt;
				<a href="<%=basePath %>user/d/<%=dbyqtype %>list.jsp" class="position"><%=byqname %></a>&gt;
				<a  class="position">修改低压线路</a>
				<a class="right" href="<%=basePath%>user/d/dyxllist.jsp?devicetype=<%=devicetype%>&deviceid=<%=transformercode%>&t=<%=System.currentTimeMillis() %>">返回</a><a class="right"  onclick="edite()">保存</a>
			</div>
			<!-- 运行参数_begin -->
			<div class="argument_box">
				<!-- 参数标题-begin -->
				<div class="argument_title">
					<p class="title">运行参数</p>
					<a  class="show"></a>
					<div class="clear"></div>
				</div>				
				<!-- 参数标题-end -->
				<!-- 参数内容_begin -->
				<div class="argument_cont_box">
					<ul class="argument_cont_ul">
						<li class="argument_cont_li"><span>设备名称：</span><input type="hidden" class="text"  value="<%=device.getDeviceid()%>" name="deviceid"/><input class="text" type="text" id="devicename" name="devicename" maxlength="100" value="<%=device.getDevicename()%>"/><em style="color:red;"> *</em></li>
						<li class="argument_cont_li"><span>运行编号：</span><input class="text" type="text" id="devicenumber" name="devicenumber" value="<%=device.getDevicenumber()%>"/></li>
						<li class="argument_cont_li">
							<span>变压器类型：</span>
							<!-- <select class="select_down" id="devicetype" name="devicetype">
								<option value="1">配电变压器</option>
								<option value="2">柱上变压器</option>
							</select> -->
							<input class="text" type="hidden" id="devicetype" name="devicetype" value="<%=devicetype%>"/>
							<%if(devicetype==1){ %>
							<input class="text" readonly="readonly" type="text" value="配电变压器"/>
							<%}else {%>
							<input class="text" readonly="readonly" type="text" value="柱上变压器"/>
							<%} %>
							<!-- <em style="color:red;"> *</em> -->
							</li>						
						<div class="clear"></div>
					</ul>
					<ul class="argument_cont_ul">
						<li class="argument_cont_li">
							<span>所属变压器：</span>
							<!-- <select class="select_down" id="transformercode" name="transformercode">
								<option value="0" selected="selected">--请选择--</option>
							</select> -->
							<input class="text" type="hidden" id="transformercode" name="transformercode" value="<%=transformercode %>" />
							<input class="text" type="text" readonly="readonly" value="<%=predevicename%>"/>
							<!-- <em style="color:red;"> *</em> -->
						</li>
						<li class="argument_cont_li"><span>所属地市：</span><input class="text" type="text" id="localcity" name="localcity" value="<%=device.getLocalcity()%>"/><!-- <em style="color:red;"> *</em> --></li>
						<li class="argument_cont_li"><span>运维单位：</span><input class="text" type="text" id="operationunit" name="operationunit" value="<%=device.getOperationunit()%>"/><!-- <em style="color:red;"> *</em> --></li>					
						<div class="clear"></div>
					</ul>
					<ul class="argument_cont_ul">
						<li class="argument_cont_li"><span>维护班组：</span><input class="text" type="text" id="maintenanceteam" name="maintenanceteam" value="<%=device.getMaintenanceteam()%>"/><!-- <em style="color:red;"> *</em> --></li>
						<li class="argument_cont_li">
							<span>电压等级：</span>
							<select class="select_down" id="voltagelevel" name="voltagelevel">
								<option value="380v">380v</option>
								<option value="220v">220v</option>
							</select>
							<!-- <em style="color:red;"> *</em> -->
						</li>
						<li class="argument_cont_li" style="position:relative;"><span>投运日期：</span><input class="text" type="text"  placeholder="请选择日期" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" name="commissioningdate" value="<%=device.getCommissioningdate()%>"/><img width="16" height="16" src="../images/select_date.jpg" style="position:absolute; top:12px;left:230px;" /><!-- <em style="color:red;"> *</em> --></li>							
						<div class="clear"></div>
					</ul>
					<ul class="argument_cont_ul">
						<li class="argument_cont_li">
							<span>线路类型：</span>
							<select class="select_down" id="linetype" name="linetype">  
								<option value ="架空" selected="selected">架空</option>  
								<option value ="混合">混合</option>
								<option value ="电缆">电缆</option> 			
							</select>
							<!-- <em style="color:red;"> *</em> -->
						</li>
						<li class="argument_cont_li">
							<span>线路总长度：</span><input class="text" type="text" id="totallinelength" name="totallinelength" value="<%=device.getTotallinelength()%>"/></li>
						<li class="argument_cont_li"><span>架空线路长度：</span><input class="text" type="text" id="overheadlinelength" name="overheadlinelength" value="<%=device.getOverheadlinelength()%>"/></li>	
						<div class="clear"></div>
					</ul>
					<ul class="argument_cont_ul">
						<li class="argument_cont_li"><span>电缆线路长度：</span><input class="text" type="text" id="cablelength" name="cablelength" value="<%=device.getCablelength()%>"/></li>
						<li class="argument_cont_li">
							<span>设备状态：</span>
							<select class="select_down" id="equipmentstate" name="equipmentstate">  
								<option value ="在运" selected="selected">在运</option>  
								<option value ="未投运">未投运</option>
								<option value ="退役">退役</option>
								<option value ="现场留用">现场留用</option>
								<option value ="库存备用">库存备用</option>
								<option value ="待报废">待报废</option>
								<option value ="报废">报废</option>
								<option value ="正常">正常</option>
								<option value ="异常">异常</option> 			
							</select>
							<!-- <em style="color:red;"> *</em> -->
						</li>
						<li class="argument_cont_li">
							<span>运行状态：</span>
							<select class="select_down" id="operationstate" name="operationstate">
								<option value="正常">正常</option>
								<option value="异常">异常</option>
								<option value="故障">故障</option>
								<option value="缺陷">缺陷</option>
							</select>
							<!-- <em style="color:red;"> *</em> -->
						</li>							
						<div class="clear"></div>
					</ul>
					<ul class="argument_cont_ul">
						<li class="argument_cont_li"><span>设备主人：</span><input type="text" class="text" name="equipmentowner" id="equipmentowner" value="<%=device.getEquipmentowner()%>"/><!-- <em style="color:red;"> *</em> --></li>
						<div class="clear"></div>
					</ul>
				</div>
				<!-- 参数内容_end -->
			</div>
			<!-- 运行参数_end -->

			<!-- 资产参数_begin -->
			<div class="argument_box">
				<!-- 参数标题-begin -->
				<div class="argument_title">
					<p class="title">资产参数</p>
					<a  class="show"></a>
					<div class="clear"></div>
				</div>				
				<!-- 参数标题-end -->
				<!-- 参数内容_begin -->
				<div class="argument_cont_box">
					<ul class="argument_cont_ul">
						<li class="argument_cont_li">
							<span>资产性质：</span>
							<select class="select_down" id="assetsnature" name="assetsnature">  
								<option value ="用户" selected="selected">用户</option>  
								<option value ="公司">公司</option>
								<option value ="子公司">子公司</option>
								<option value ="省(直辖市、自治区)">省(直辖市、自治区)</option>				
							</select>
							<!-- <em style="color:red;"> *</em> -->
						</li>
						<li class="argument_cont_li"><span>资产单位：</span><input class="text" type="text" name="assetunit" value="<%=device.getAssetunit()%>"/></li>
						<li class="argument_cont_li"><span>资产编号：</span><input class="text" type="text" id="assetnumber" name="assetnumber" value="<%=device.getAssetnumber()%>"/><!-- <em style="color:red;"> *</em> --></li>	
						<div class="clear"></div>
					</ul>					
				</div>
				<!-- 参数内容_end -->
			</div>
			<!-- 资产参数_end -->
		</div>	
		<!-- 柱上变压器_end -->		
	</div>
	</form>
	<%}else{ %>
	<h4>设备id错误</h4>
	<%} %>
	<!-- 右侧内容_end -->
	<div class="clear"></div><!-- 清除左右浮动 -->
	</div>
	<!-- main_end -->
	<%@ include file="/user/foot.jsp"%>
</body>
</html>